/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package fr.inria.openmath.omapi.implementation;

/**
 *
 * @author Mr.Sam
 */

import fr.inria.openmath.omapi.*;

/**
 * Defines accessor/mutators for this kind of node.
 */
public class ApplyNodeImpl extends NodeImpl implements ApplyNode {

    public ApplyNodeImpl () {
        this.type = Node.OM_APP;
    }

    /**
     * @see fr.inria.openmath.omapi.ApplyNode#getFunction
     */
    public Node getFunction() {
        return this.getFirstChild();
    }


    /**
     * @see fr.inria.openmath.omapi.ApplyNode#getFirstArg
     */
    public Node getFirstArg() {
        Node n = this.getFirstChild();
        if (n != null) {
            return n.getNextSibling();
        } else {
            return null;
        }
    }

}

